package com.demo.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * GatewayAccountStatus
 * 
 * @author demo
 * @data 2021-07-27 21:39:14
 */
@Getter
@AllArgsConstructor
public enum GatewayAccountStatus {
    /** 关闭 */
    DISABLED(0, "关闭"),
    /** 开启 */
    ENABLED(1, "开启"),

    ;

    /**  */
    private Integer code;
    /**  */
    private String name;

    public static synchronized GatewayAccountStatus getByCode(Integer code) {
        for (GatewayAccountStatus e : GatewayAccountStatus.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }

}
